package com.ai.flight.business.controller;

import java.util.List;

import com.ai.flight.business.record.FlightBooking;
import com.ai.flight.business.service.FlightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: suren@517na.com
 * @CreateTime: 2025-06-01
 * @Description: 航班业务 Controller
 */

@RestController
@RequestMapping("/booking")
public class FlightController {

    @Autowired
    private FlightService flightService;

    @CrossOrigin
    @GetMapping(value = "/list")
    public List<FlightBooking.BookingDetails> getBookings() {
        return flightService.getBookings();
    }
}
